﻿using EmbeddedSharp.Core;

namespace Zove.Runtime.Core
{
    /// <summary>
    /// Runtime model loader
    /// </summary>
    public interface IRuntimeModelLoader
    {
        /// <summary>
        /// Load by class name
        /// </summary>
        /// <param name="instanceName">the name of the instance</param>
        /// <param name="className">class name</param>
        /// <returns>a runtime model</returns>
        RuntimeModel LoadByClassName(string instanceName, string className);

        /// <summary>
        /// Load by class name
        /// </summary>
        /// <param name="className">class name</param>
        /// <returns>a runtime model</returns>
        RuntimeModel LoadByClassName(string className);

        /// <summary>
        /// Load by the class source
        /// </summary>
        /// <param name="source">the source</param>
        /// <returns>a runtime model</returns>
        RuntimeModel LoadBySource(string source);

        /// <summary>
        /// Load by the class source
        /// </summary>
        /// <param name="instanceName">the name of the instance</param>
        /// <param name="source">the source</param>
        /// <returns>a runtime model</returns>
        RuntimeModel LoadBySource(string instanceName, string source);

        /// <summary>
        /// Load by a content provider
        /// </summary>
        /// <param name="textContentProvider">content provider</param>
        /// <returns>a runtime model</returns>
        RuntimeModel Load(ITextContentProvider textContentProvider);
    }
}